using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace Krile.Forms.MainForm.Controls.XTab
{
    public abstract class XTabItemBase
    {
        private string identifyString;
        public XTabItemBase()
        {
            identifyString = Guid.NewGuid().ToString("N");
        }

        public override bool Equals(object obj)
        {
            XTabItemBase compTo = obj as XTabItemBase;
            if (compTo != null && compTo.identifyString == this.identifyString)
                return true;
            else
                return false;
        }

        public override int GetHashCode()
        {
            return identifyString.GetHashCode();
        }

        public abstract string Name { get;set; }

        public abstract Rectangle ClientRectangle { get; }

        public virtual void OnMouseEnter(object obj, MouseEventArgs e) { }

        public virtual void OnMouseLeave(object obj, MouseEventArgs e) { }

        public virtual void OnMouseDown(object obj, MouseEventArgs e) { }

        public virtual void OnMouseUp(object obj, MouseEventArgs e) { }

        public virtual void OnMouseClick(object obj, MouseEventArgs e) { }

        public virtual void OnMouseDoubleClick(object obj, MouseEventArgs e) { }

        public virtual void OnMouseMove(object obj, MouseEventArgs e) { }
    }
}
